import os
import shutil

os.system("yarn build")  # output to the ./webdist
if os.path.exists("./LigralPy/static/js"):
    shutil.rmtree("./LigralPy/static/js")
shutil.copytree("./webdist/js", "./LigralPy/static/js")
shutil.copy("./webdist/index.html", "./LigralPy/static/index.html")
shutil.copy("./webdist/favicon.ico", "./LigralPy/static/favicon.ico")

# upload command: twine upload dist/LigralPy-x.y.z-py3-none-any.whl